<%@page language="java" contentType="application/x-msdownload" pageEncoding="UTF-8" %>
<%@ page import="java.net.URLEncoder" %>
<%@ page import="com.belonk.msoffice.excel.ExportExcelUtil" %>
<%

    java.io.OutputStream outp = response.getOutputStream();


    //关于文件下载时采用文件流输出的方式处理：
    response.reset();
    response.setContentType("application/vnd.ms-excel");
    String fileName = URLEncoder.encode(request.getParameter("fileName") + ".xls", "UTF-8");
    response.addHeader("Content-Disposition", "attachment;filename=" + fileName);
    String content = request.getParameter("fileContent");

    ExportExcelUtil exportExcel = new ExportExcelUtil();
    exportExcel.exportWithJsonContent(outp, content);
%>